\(\int \frac {\log (c (a+b \sqrt {x})^p)}{x^2} \, dx\) [51]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 63 \[ \int \frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x^2} \, dx=-\frac {b p}{a \sqrt {x}}+\frac {b^2 p \log \left (a+b \sqrt {x}\right )}{a^2}-\frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x}-\frac {b^2 p \log (x)}{2 a^2} \]

[Out]

-1/2*b^2*p*ln(x)/a^2+b^2*p*ln(a+b*x^(1/2))/a^2-ln(c*(a+b*x^(1/2))^p)/x-b*p/a/x^(1/2)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2504, 2442, 46} \[ \int \frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x^2} \, dx=\frac {b^2 p \log \left (a+b \sqrt {x}\right )}{a^2}-\frac {b^2 p \log (x)}{2 a^2}-\frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x}-\frac {b p}{a \sqrt {x}} \]

[In]

Int[Log[c*(a + b*Sqrt[x])^p]/x^2,x]

[Out]

-((b*p)/(a*Sqrt[x])) + (b^2*p*Log[a + b*Sqrt[x]])/a^2 - Log[c*(a + b*Sqrt[x])^p]/x - (b^2*p*Log[x])/(2*a^2)

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 2504

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rubi steps \begin{align*} \text {integral}& = 2 \text {Subst}\left (\int \frac {\log \left (c (a+b x)^p\right )}{x^3} \, dx,x,\sqrt {x}\right ) \\ & = -\frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x}+(b p) \text {Subst}\left (\int \frac {1}{x^2 (a+b x)} \, dx,x,\sqrt {x}\right ) \\ & = -\frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x}+(b p) \text {Subst}\left (\int \left (\frac {1}{a x^2}-\frac {b}{a^2 x}+\frac {b^2}{a^2 (a+b x)}\right ) \, dx,x,\sqrt {x}\right ) \\ & = -\frac {b p}{a \sqrt {x}}+\frac {b^2 p \log \left (a+b \sqrt {x}\right )}{a^2}-\frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x}-\frac {b^2 p \log (x)}{2 a^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.87 \[ \int \frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x^2} \, dx=-\frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x}-\frac {b p \left (\frac {2 a}{\sqrt {x}}-2 b \log \left (a+b \sqrt {x}\right )+b \log (x)\right )}{2 a^2} \]

[In]

Integrate[Log[c*(a + b*Sqrt[x])^p]/x^2,x]

[Out]

-(Log[c*(a + b*Sqrt[x])^p]/x) - (b*p*((2*a)/Sqrt[x] - 2*b*Log[a + b*Sqrt[x]] + b*Log[x]))/(2*a^2)

Maple [A] (verified)

Time = 0.25 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.86

method result size
parts \(-\frac {\ln \left (c \left (a +b \sqrt {x}\right )^{p}\right )}{x}+\frac {p b \left (-\frac {2}{a \sqrt {x}}-\frac {b \ln \left (x \right )}{a^{2}}+\frac {2 b \ln \left (a +b \sqrt {x}\right )}{a^{2}}\right )}{2}\) \(54\)

[In]

int(ln(c*(a+b*x^(1/2))^p)/x^2,x,method=_RETURNVERBOSE)

[Out]

-ln(c*(a+b*x^(1/2))^p)/x+1/2*p*b*(-2/a/x^(1/2)-1/a^2*b*ln(x)+2/a^2*b*ln(a+b*x^(1/2)))

Fricas [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.87 \[ \int \frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x^2} \, dx=-\frac {b^{2} p x \log \left (\sqrt {x}\right ) + a b p \sqrt {x} + a^{2} \log \left (c\right ) - {\left (b^{2} p x - a^{2} p\right )} \log \left (b \sqrt {x} + a\right )}{a^{2} x} \]

[In]

integrate(log(c*(a+b*x^(1/2))^p)/x^2,x, algorithm="fricas")

[Out]

-(b^2*p*x*log(sqrt(x)) + a*b*p*sqrt(x) + a^2*log(c) - (b^2*p*x - a^2*p)*log(b*sqrt(x) + a))/(a^2*x)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 352 vs. \(2 (56) = 112\).

Time = 11.00 (sec) , antiderivative size = 352, normalized size of antiderivative = 5.59 \[ \int \frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x^2} \, dx=\begin {cases} - \frac {\log {\left (0^{p} c \right )}}{x} & \text {for}\: a = 0 \wedge b = 0 \\- \frac {p}{2 x} - \frac {\log {\left (c \left (b \sqrt {x}\right )^{p} \right )}}{x} & \text {for}\: a = 0 \\- \frac {\log {\left (0^{p} c \right )}}{x} & \text {for}\: a = - b \sqrt {x} \\- \frac {2 a^{3} \sqrt {x} \log {\left (c \left (a + b \sqrt {x}\right )^{p} \right )}}{2 a^{3} x^{\frac {3}{2}} + 2 a^{2} b x^{2}} - \frac {2 a^{2} b p x}{2 a^{3} x^{\frac {3}{2}} + 2 a^{2} b x^{2}} - \frac {2 a^{2} b x \log {\left (c \left (a + b \sqrt {x}\right )^{p} \right )}}{2 a^{3} x^{\frac {3}{2}} + 2 a^{2} b x^{2}} - \frac {a b^{2} p x^{\frac {3}{2}} \log {\left (x \right )}}{2 a^{3} x^{\frac {3}{2}} + 2 a^{2} b x^{2}} - \frac {2 a b^{2} p x^{\frac {3}{2}}}{2 a^{3} x^{\frac {3}{2}} + 2 a^{2} b x^{2}} + \frac {2 a b^{2} x^{\frac {3}{2}} \log {\left (c \left (a + b \sqrt {x}\right )^{p} \right )}}{2 a^{3} x^{\frac {3}{2}} + 2 a^{2} b x^{2}} - \frac {b^{3} p x^{2} \log {\left (x \right )}}{2 a^{3} x^{\frac {3}{2}} + 2 a^{2} b x^{2}} + \frac {2 b^{3} x^{2} \log {\left (c \left (a + b \sqrt {x}\right )^{p} \right )}}{2 a^{3} x^{\frac {3}{2}} + 2 a^{2} b x^{2}} & \text {otherwise} \end {cases} \]

[In]

integrate(ln(c*(a+b*x**(1/2))**p)/x**2,x)

[Out]

Piecewise((-log(0**p*c)/x, Eq(a, 0) & Eq(b, 0)), (-p/(2*x) - log(c*(b*sqrt(x))**p)/x, Eq(a, 0)), (-log(0**p*c)
/x, Eq(a, -b*sqrt(x))), (-2*a**3*sqrt(x)*log(c*(a + b*sqrt(x))**p)/(2*a**3*x**(3/2) + 2*a**2*b*x**2) - 2*a**2*
b*p*x/(2*a**3*x**(3/2) + 2*a**2*b*x**2) - 2*a**2*b*x*log(c*(a + b*sqrt(x))**p)/(2*a**3*x**(3/2) + 2*a**2*b*x**
2) - a*b**2*p*x**(3/2)*log(x)/(2*a**3*x**(3/2) + 2*a**2*b*x**2) - 2*a*b**2*p*x**(3/2)/(2*a**3*x**(3/2) + 2*a**
2*b*x**2) + 2*a*b**2*x**(3/2)*log(c*(a + b*sqrt(x))**p)/(2*a**3*x**(3/2) + 2*a**2*b*x**2) - b**3*p*x**2*log(x)
/(2*a**3*x**(3/2) + 2*a**2*b*x**2) + 2*b**3*x**2*log(c*(a + b*sqrt(x))**p)/(2*a**3*x**(3/2) + 2*a**2*b*x**2),
True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.84 \[ \int \frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x^2} \, dx=\frac {1}{2} \, b p {\left (\frac {2 \, b \log \left (b \sqrt {x} + a\right )}{a^{2}} - \frac {b \log \left (x\right )}{a^{2}} - \frac {2}{a \sqrt {x}}\right )} - \frac {\log \left ({\left (b \sqrt {x} + a\right )}^{p} c\right )}{x} \]

[In]

integrate(log(c*(a+b*x^(1/2))^p)/x^2,x, algorithm="maxima")

[Out]

1/2*b*p*(2*b*log(b*sqrt(x) + a)/a^2 - b*log(x)/a^2 - 2/(a*sqrt(x))) - log((b*sqrt(x) + a)^p*c)/x

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 132 vs. \(2 (55) = 110\).

Time = 0.31 (sec) , antiderivative size = 132, normalized size of antiderivative = 2.10 \[ \int \frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x^2} \, dx=-\frac {\frac {b^{3} p \log \left (b \sqrt {x} + a\right )}{{\left (b \sqrt {x} + a\right )}^{2} - 2 \, {\left (b \sqrt {x} + a\right )} a + a^{2}} - \frac {b^{3} p \log \left (b \sqrt {x} + a\right )}{a^{2}} + \frac {b^{3} p \log \left (b \sqrt {x}\right )}{a^{2}} + \frac {{\left (b \sqrt {x} + a\right )} b^{3} p - a b^{3} p + a b^{3} \log \left (c\right )}{{\left (b \sqrt {x} + a\right )}^{2} a - 2 \, {\left (b \sqrt {x} + a\right )} a^{2} + a^{3}}}{b} \]

[In]

integrate(log(c*(a+b*x^(1/2))^p)/x^2,x, algorithm="giac")

[Out]

-(b^3*p*log(b*sqrt(x) + a)/((b*sqrt(x) + a)^2 - 2*(b*sqrt(x) + a)*a + a^2) - b^3*p*log(b*sqrt(x) + a)/a^2 + b^
3*p*log(b*sqrt(x))/a^2 + ((b*sqrt(x) + a)*b^3*p - a*b^3*p + a*b^3*log(c))/((b*sqrt(x) + a)^2*a - 2*(b*sqrt(x)
+ a)*a^2 + a^3))/b

Mupad [B] (verification not implemented)

Time = 1.75 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.78 \[ \int \frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x^2} \, dx=\frac {2\,b^2\,p\,\mathrm {atanh}\left (\frac {2\,b\,\sqrt {x}}{a}+1\right )}{a^2}-\frac {\ln \left (c\,{\left (a+b\,\sqrt {x}\right )}^p\right )}{x}-\frac {b\,p}{a\,\sqrt {x}} \]

[In]

int(log(c*(a + b*x^(1/2))^p)/x^2,x)

[Out]

(2*b^2*p*atanh((2*b*x^(1/2))/a + 1))/a^2 - log(c*(a + b*x^(1/2))^p)/x - (b*p)/(a*x^(1/2))